/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.octgame.octantis.entity;

/**
 *
 * @author Henrik Bergvin <henrik.bergvin@gmail.com>
 */
public class Entity {

    double heading;  // Heading currently set
    double facing;   // Direction currently facing
    double turnRate; // turnrate per second

    public Entity()
    {
        heading = 0;
        facing = 0;
        turnRate = Math.toRadians(5); // Default turn rate of 5 deg/sec
    }

    public void setHeading(double degree)
    {
        heading = Math.toRadians(degree);
    }

    public void setTurnRate(double rate)
    {
        turnRate = Math.toRadians(rate);
    }

    public double getHeading()
    {
        return Math.toDegrees(heading);
    }

    public double getFacing()
    {
        return Math.toDegrees(facing);
    }


    // Calculates the facing of the entity after a given time
    public void calcFacing(double time)
    {
        // No calculation if the heading and facing matches
        if (heading == facing) return;

        
    }

}
